05. 二项分布测试

二项分布测试

在这个测试中,你将使用 np.random.binomial 计算下列结果的比例。

  1. 一次均衡掷硬币得到正面
  2. 五次均衡掷硬币得到一次正面
  3. 十次均衡掷硬币得到四次正面
  4. P(H) = 0.8 时五次不均衡掷硬币得到五次正面
  5. P(H) = 0.15 时十次不均衡掷硬币得到得到三次及三次以上正面

然后,你在下面的练习中对比这些比例的概率。

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a

QUIZ QUESTION: :

请使用在模拟数据中观察到的比例,去猜测下列结果的概率。

ANSWER CHOICES:



结果

概率

0.2

0

0.130

0.5

0.45

1

0.205

0.180

0.156

0.328

SOLUTION:

结果

概率

0.5

0.205

0.180

0.156

0.328

计算每个结果的概率。它们是否与你模拟数据中的比例相匹配呢?

SOLUTION: